Skip to content

docs: add note about JavaScript-based locale files limited support #650

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 30, 2025

Conversation

junwen-k
Copy link
Contributor

@junwen-k junwen-k commented Jul 5, 2025

This PR adds a note to clarify that JavaScript-based locale files (.js and .ts) are not currently supported, with a reference to the relevant GitHub issue.

This helps users understand the current limitations of the plugin and provides a link to track the feature request.

Thank you. #32

Copy link

changeset-bot bot commented Jul 5, 2025

⚠️ No Changeset found

Latest commit: adfa71f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

docs/started.md Outdated
@@ -177,6 +177,8 @@ This plugin provides some predefined configs. You can use the following configs

The `localePattern` options does not support SFC i18n custom blocks (`src` attribute), only for resources of files to import when specified in VueI18n's `messages` options (VueI18n v9 and later, `messages` specified in `createI18n`) for resources of files to import.

JavaScript-based locale files (e.g., `.js` and `.ts`) are not currently supported. For more information, please see [#32](https://github.com/intlify/eslint-plugin-vue-i18n/issues/32).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late reply. Thanks for the PR.
I don't think it's completely unsupported. I think we can use the js file to check with the no-missing-keys rule.
https://eslint-plugin-vue-i18n.intlify.dev/rules/no-missing-keys.html
However, rules that check locale files, such as the no-dynamic-keys rule, are not supported.
https://github.com/intlify/eslint-plugin-vue-i18n/blob/master/docs/rules/no-dynamic-keys.md

Could you make some more changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ota-meshi, thanks for replying.

I've updated the warning to be more accurate:

"JavaScript-based locale files have limited support. JavaScript (.js) files can be loaded and used with rules that check for missing keys (like no-missing-keys), but TypeScript (.ts) locale files are not supported. Rules that analyze locale file contents (like no-duplicate-keys-in-locale and no-html-messages) are not supported for either format. For more information, please see #32."

Can you confirm if this warning is accurate? I want to make sure I'm not spreading incorrect information about the plugin's capabilities.

Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you!

@ota-meshi ota-meshi merged commit a9d312a into intlify:master Jul 30, 2025
3 checks passed
@junwen-k junwen-k changed the title docs: add note about JavaScript-based locale files not being supported docs: add note about JavaScript-based locale files limited support Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants